package com.qf.smartplatform.mapper;/*
*王浩政 
*whz
2022/9/7
21:32
*小米商城
*/

import com.qf.smartplatform.pojo.SysUserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface UserMapper {
 //   @Insert("INSERT INTO sys_user_info(username,password,pwd_salt,name,phone,email,sex,create_by,remark)VALUES(#{username},#{password},#{pwd_salt},#{name},#{phone},#{email},#{sex},#{create_by},#{remark})")
 //   void addUser(SysUserInfo sysUserInfo);
   @Insert("INSERT INTO sys_user_info (username,password,pwd_salt,`name`,phone,email,sex,create_by,remark) VALUES (#{username},#{password},#{pwdSalt},#{name},#{phone},#{email},#{sex},#{createBy},#{remark})")
    void addUser(SysUserInfo sysUserInfo);

   List<SysUserInfo>findByUserNameOrPhoneOrEmail(@Param("userName") String userName, @Param("phone")String phone, @Param("email") String email);
   SysUserInfo findUserByName(String userName);
    void updateLoginDataByUserId(@Param("uId")Long uId,@Param("ip") String ip);

}
